package com.yeqian.system.controller;
import com.github.pagehelper.PageInfo;
import com.yeqian.vo.PageVO;
import com.yeqian.entity.ResultJson;
import com.yeqian.system.entity.SystemConfig;
import com.yeqian.system.service.SystemConfigService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.File;

/**
 * 系统配置控制器
 */
@RestController
@RequestMapping(Urls.SystemConfig.SYSTEM_CONFIG)
public class SystemConfigController {

    @Resource
    private SystemConfigService systemConfigService;

    /**
     * 查看系统配置列表
     * @return
     */
    @PostMapping(Urls.SystemConfig.LIST_SYSTEMCONFIG)
    public ResultJson listSystemConfig(@RequestBody PageVO pageVO){
        PageInfo<SystemConfig> list=systemConfigService.listSystemConfig(pageVO);
        return  ResultJson.Success("查看系统配置列表成功",list);
    }
}
